onmessage =function (evt){
    var data = evt.data
    importScripts("NoDomJQ.js")
    LogInON()
    function LogInON() {
        //$("#mid").val("已发送请求......");
        var CMD = "LogInOrOut";
        $.ajax({
            type: "post",
            url: data["url"]+"/tel/LogInOrOut",
            data: {
                CMD: CMD, WorkNumber: data["WorkNumber"], LoginType: 2
                , WorkGroup: data["WorkGroup"], WorkID: data["WorkID"]
                , PassWord: data["PassWord"], dvType: 1, StateAcType: 1
                ,AfertWorkTimeOut : data["AfertWorkTimeOut"]
                ,WorkState : data["WorkState"]
            },
            dataType: "json",
            async: false, //加上之后不在跳转进error
            success: function (result) {
                console.log( "心跳保持")
            },
        });
        /*$.getJSON("http://user.hnce.com.cn/getregion.aspx?id=0&jsoncallback=?",function(json){

            //要求远程请求页面的数据格式为： ?(json_data) //例如： //?([{"_name":"湖南省","_regionId":134},{"_name":"北京市","_regionId":143}]) alert(json[0]._name);

        });*/
        setTimeout(function (){
            LogInON()
        },15000);
    }

}

//LogInON()

